# [member]
ETCD_NAME={{ cluster_name }}
ETCD_DATA_DIR="{{etcd_data_dir}}"
#ETCD_WAL_DIR="/var/lib/etcd/wal"
#ETCD_SNAPSHOT_COUNT="100"
#ETCD_HEARTBEAT_INTERVAL="100"
#ETCD_ELECTION_TIMEOUT="1000"
ETCD_LISTEN_PEER_URLS="https://{{ inventory_hostname }}:2380"
ETCD_LISTEN_CLIENT_URLS="https://{{ inventory_hostname }}:2379,http://127.0.0.1:2379"
ETCD_MAX_SNAPSHOTS="5"
ETCD_MAX_WALS="5"
#ETCD_CORS=""

# [cluster]
ETCD_INITIAL_ADVERTISE_PEER_URLS="https://{{ inventory_hostname }}:2380"
# if you use different ETCD_NAME (e.g. test), set ETCD_INITIAL_CLUSTER value for this name, i.e. "test=http://..."
ETCD_INITIAL_CLUSTER="{% for host in groups['etcd'] %}{{hostvars[host]['cluster_name']}}=https://{{hostvars[host]['inventory_hostname']}}:2380{% if not loop.last %},{% endif %}{% endfor %}"
ETCD_INITIAL_CLUSTER_STATE="new"
ETCD_INITIAL_CLUSTER_TOKEN="etcd-cluster"
ETCD_ADVERTISE_CLIENT_URLS="https://{{ inventory_hostname }}:2379"
#ETCD_DISCOVERY=""
#ETCD_DISCOVERY_SRV=""
#ETCD_DISCOVERY_FALLBACK="proxy"
#ETCD_DISCOVERY_PROXY=""
#ETCD_STRICT_RECONFIG_CHECK="false"
#ETCD_AUTO_COMPACTION_RETENTION="0"

# [proxy]
#ETCD_PROXY="off"
#ETCD_PROXY_FAILURE_WAIT="5000"
#ETCD_PROXY_REFRESH_INTERVAL="30000"
#ETCD_PROXY_DIAL_TIMEOUT="1000"
#ETCD_PROXY_WRITE_TIMEOUT="5000"
#ETCD_PROXY_READ_TIMEOUT="0"

# [security]
ETCD_CERT_FILE="{{ tls_dir }}etcd.pem"
ETCD_KEY_FILE="{{ tls_dir }}etcd-key.pem"
ETCD_CLIENT_CERT_AUTH="true"
ETCD_TRUSTED_CA_FILE="{{ tls_dir }}ca.pem"
ETCD_AUTO_TLS="true"
ETCD_PEER_CERT_FILE="{{ tls_dir }}etcd.pem"
ETCD_PEER_KEY_FILE="{{ tls_dir }}etcd-key.pem"
ETCD_PEER_CLIENT_CERT_AUTH="true"
ETCD_PEER_TRUSTED_CA_FILE="{{ tls_dir }}ca.pem"
ETCD_PEER_AUTO_TLS="true"

# [logging]
ETCD_LOGGER=zap
#ETCD_DEBUG="false"
# examples for -log-package-levels etcdserver=WARNING,security=DEBUG
#ETCD_LOG_PACKAGE_LEVELS=""
